Configure NIS Client
2010/07/22 |
Configure on NIS clients in order to share users' accounts. |
|
[1] | Install NIS |
root@mail05:~# aptitude -y install nis portmap Preconfiguring packages ... # input domain name root@mail05:~# update-rc.d portmap defaults 10 # set before NIS update-rc.d: warning: /etc/init.d/portmap missing LSB information update-rc.d: see <http://wiki.debian.org/LSBInitScripts> # it's no ploblem above. it may be bugs Adding system startup for /etc/init.d/portmap ... /etc/rc0.d/K19portmap -> ../init.d/portmap /etc/rc1.d/K19portmap -> ../init.d/portmap /etc/rc6.d/K19portmap -> ../init.d/portmap /etc/rc2.d/S19portmap -> ../init.d/portmap /etc/rc3.d/S19portmap -> ../init.d/portmap /etc/rc4.d/S19portmap -> ../init.d/portmap /etc/rc5.d/S19portmap -> ../init.d/portmap |
[2] | Configure as a NIS Client |
root@mail05:~# vi /etc/yp.conf # # yp.conf Configuration file for the ypbind process. You can define # NIS servers manually here if they can't be found by # broadcasting on the local net (which is the default). # # See the manual page of ypbind for the syntax of this file. # # IMPORTANT: For the "ypserver", use IP addresses, or make sure that # the host is in /etc/hosts. This file is only interpreted # once, and if DNS isn't reachable yet the ypserver cannot # be resolved and ypbind won't ever bind to the server. # ypserver ypserver.network.com # add at the bottom: (domain name) (server) (NIS server's hostname) domain srv.world server master.srv.world root@mail05:~# vi /etc/nsswitch.conf passwd: nis compat# line 7: add group: nis compat# add shadow: nis compat# add root@mail05:~# mail05 login: ubuntu # user on NIS Password: No directory, logging in with HOME=/ ubuntu@mail05:/$ # logined ubuntu@mail05:/$ 10.0.0.55 ubuntu@mail05:/$ ypcat passwd ubuntu:x:1001:1002:,,,:/home/ubuntu:/bin/bash lucid:x:1000:1000:lucid,,,:/home/lucid:/bin/bash |